//home子路由
import { 
  Connection,
  User,
  Tickets,
  DataLine,
  Reading,
} from '@element-plus/icons-vue'

const options = [
  {
    path:'setting',
    meta:{
      title:'全局配置',
      icon: Connection,
      isflex:true
    }
  },{
    path:'student',
    meta:{
      title:'学生管理',
      icon: User,
    }
  },{
    path:'grade',
    meta:{
      title:'成绩管理',
      icon: Tickets,
    }
  },{
    path:'statistic',
    meta:{
      title:'统计分析',
      icon: DataLine,
      isflex:true
    }
  },{
    path:'log',
    meta:{
      title:'日志管理',
      icon: Reading,
    }
  },
]


const routerName = 'main'

export default options.map(route => {
  const { path } = route
  const name = path.split("/")[0]
  route = {
    name,
    ...route,
    component:() => import( /* webpackChunkName: "[request]" */ `../../pages/${routerName}/${name}/index.vue`)
  }
  return route
})